﻿import request from '/@/utils/request';
enum Api {
  GetMqttClientInfoPage = '/api/mqtt/clientPage',
  MqttStart = '/api/mqtt/start',
  MqttStop = '/api/mqtt/stop',
  MqttServerStatus = '/api/mqtt/mqttServerStatus',
  UpdateMqttDataPublish = '/api/mqtt/updateDataPublish',
  MqttDataTypes = '/api/mqtt/dataTypes',
  MqttDataType = '/api/mqtt/dataType',
}

// 分页查询设备管理
export const getMqttClientInfoPageList = (params?: any) => 
	request({
			url: Api.GetMqttClientInfoPage,
			method: 'get',
			data: params,
		});
// MqttServer状态
export const getMqttServerStatus = () => 
	request({
			url: Api.MqttServerStatus,
			method: 'get',
		});
// Mqtt启动
export const  mqttStart = (params?: any) => 
	request({
			url: Api.MqttStart,
			method: 'get',
			data: params,
		});

// Mqtt停止
export const mqttStop = () => 
	request({
			url: Api.MqttStop,
			method: 'get',
		});

export const updateMqttDataPublish = (params?: any) =>
	
	request({
			url: Api.UpdateMqttDataPublish,
			method: 'get',
			data: params,
		});



export const getDataTypes= () =>
	request({
		url: Api.MqttDataTypes,
		method: 'get',
	});

export const getDataType= () =>
request({
	url: Api.MqttDataType,
	method: 'get',
});
